synthesizeNativePointer should convert to right coordinates
Categories
(Testing :: Mochitest, defect)
Tracking
(firefox89 fixed)
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: m_kato, Assigned: m_kato)
References
(Blocks 2 open bugs, Regressed 1 open bug)
Details
Attachments
(3 files)
synthesizeNativePointer
(https://searchfox.org/mozilla-central/rev/be906232eedb22c064b78f3806b38964c04f1fbc/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/PanZoomController.java#741) doesn't convert clientX
and clientY
to right coordinates. I guess that we may have to use getClientToScreenMatrix
or getClientToSurfaceMatrix
to post right mouse point on mouse event.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Hmm, we should use right screen coordinates on SendNativeMouseEvent.
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
•
|
||
One is screen coordinate issue (bug 1701546). another one is GeckoView's mouse button emulation of SynthesizeNativeMouseEvent.
Assignee | ||
Comment 5•4 years ago
|
||
Button state is current button push state. So when on ButtonUp, this is 0.
Assignee | ||
Comment 6•4 years ago
|
||
We have to consider mobile viewport scale to calculate screen position.
And mozInnerScreen isn't valid position if that scale isn't 1 (bug 1701546).
Also, this function won't work on Fission+xorigin with mobile viewport due to
no way to get current mobile viewport scale since window.top isn't same
origin.
Depends on D110197
Assignee | ||
Comment 7•4 years ago
|
||
This test is often failure on debug build due to zoom to focused input.
Depends on D110198
Updated•4 years ago
|
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/482fec13b96f
https://hg.mozilla.org/mozilla-central/rev/5735e7f86a01
https://hg.mozilla.org/mozilla-central/rev/72ff67f96a3f
Comment 10•4 years ago
|
||
let resolution = 1.0;
try {
resolution = _getDOMWindowUtils(win.top).getResolution();
} catch (e) {
// XXX How to get mobile viewport scale on Fission+xorigin since
// window.top access isn't allowed due to cross-origin?
}
You can just use SpecialPowers.spawn;
const resolution = await SpecialPowers.spawn(window.top, [], () => {
return SpecialPowers.getDOMWindowUtils(content.window).getResolution();
});
Description
•